<template>
  <a-form-model ref="form" :rules="rules" style="padding: 0px">

    <a-form-model-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" label="endpoint" >
      <a-input style="width: 80%" :placeholder="i18n('form.connectAddress','连接地址','input')" v-model="dataObj.endpoint"/>
    </a-form-model-item>

    <a-form-model-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="i18n('form.account','账号')">
      <a-input style="width: 80%" :placeholder="i18n('form.account','账号','input')" v-model="dataObj.accessKey"/>
    </a-form-model-item>
    <a-form-model-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="i18n('form.password','密码')">
      <a-input style="width: 80%" :placeholder="i18n('form.password','密码','input')" v-model="dataObj.secretKey"/>
    </a-form-model-item>

    <a-form-model-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="i18n('form.bucketName','bucket名称')">
      <a-input style="width: 80%" :placeholder="i18n('form.bucketName','bucket名称','input')" v-model="dataObj.bucketName"/>
    </a-form-model-item>

      <a-form-model-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="i18n('form.tmpPath','临时目录')">
          <a-input style="width: 80%" :placeholder="i18n('form.pdfTmpPath','PDF临时路径')" v-model="dataObj.pdfTmpPath"/>
      </a-form-model-item>

  </a-form-model>
</template>

<script>
  import {BaseFormModel, RxDialog, Dialog} from "@lowcode/jpaas-common-lib";
  import rxAjax from '@/assets/js/ajax.js';

  export default {
    name: "SysFileStoreminio",
    mixins: [BaseFormModel],
    components: {
      RxDialog, rxAjax,
    },
    props: {
      dataObj: {
        type: Object,
        default: {
            endpoint:"",
            accessKey:"",
            secretKey:"",
            bucketName:"",
            pdfTmpPath:""
        }
      }
    },

    data() {
      return {

        rules: {
            endpoint: [{required: true, message: this.i18n('form.connectAddress','连接地址','input'), trigger: 'change'}],
            accessKey: [{required: true, message: this.i18n('form.account','账号','input'), trigger: 'change'}],
            secretKey: [{required: true, message: this.i18n('form.password','密码','input'), trigger: 'change'}],
            bucketName: [{required: true, message: this.i18n('form.bucketName','bucket名称','input'), trigger: 'change'}],
            pdfTmpPath: [{required: true, message: this.i18n('form.pdfTmpDir','PDF临时路径','input'), trigger: 'change'}],
        }
      }
    },
      methods: {
          i18n(name,text,key){
              return this.$ti18(name,text,"SysFileStore",key);
          }
      }

  }
</script>

<style scoped>

</style>